﻿using System;
using System.Diagnostics;
using System.Threading;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            学习Task.ParallelInvoke2();

            Thread.Sleep(1000);
            Console.ReadKey();
            #region 过期
            //FileTest.TestReadCSV();
            

            //var xxx = new ConditionalAttribute测试();
            //xxx.Common();
            //xxx.Mock();
            //Console.WriteLine(xxx.str);
            //反射接口.Run();
            //SomeClass.Run(500000);

            #region Ninject AOP
            
            //try
            //{
            //    using (var kernal = new StandardKernel(new LogModule()))
            //    {
            //        kernal.AddMethodInterceptor(typeof(FileLog).GetMethod("Write"), i => 
            //        {
            //            Trace.WriteLine("wow");
            //        });
            //        var loger = kernal.Get<ILog>();
            //        loger.Write("test");
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex.Message);
            //}

            #endregion
            #region 显式实现接口
            /*显式实现接口可隐藏接口方法,但可以通过类型转换找回来
                         * 
                         * 
                         
                        var e = new Element();
                        e.Attr("Id", "userid");
                        e.Attr("name", "梅西");
                        Console.WriteLine((e as IElement).GetAttr("Id"));
                        **/
            #endregion

            #endregion
        }

        /// <summary>
        /// default关键字在泛型里使用，引用类型为null，值类型为0
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public static T GetDef<T>()
        {
            //var str = GetDef<string>();
            return default(T);
        }
    }
}
